Scripting > CxCvs > CvsClient Object > CvsClient Methods

CvsClient Methods

The CvsClient object contains the following methods:

Note: A description for each CxCvsLib helper object can be found in CxCvsLib Helper Objects.

AlphaGet

Syntax

AlphaGet(Request As AlphaGetReq, Response As AlphaGetResp) As Integer

Parameters

Parameter Required Description

Request

Yes

The request object that contains the parameters for this method.

Type: AlphaGetReq

Response

Yes

The response object that contains the output of this method.

Type: AlphaGetResp

Back to top

AlphaGetRtREx

Syntax

AlphaGetRtREx (Request As AlphaGetRtRExReq, Response As AlphaGetRtRExResp) As Integer

Parameters

Parameter Required Description

Request

Yes

The request object that contains the parameters for this method.

Type: AlphaGetRtRExReq

Response

Yes

The response object that contains the output of this method.

Type: AlphaGetRtRExResp

Back to top

Connect

The Connect method connects the object to a service.

Syntax

Connect(DomainSiteService As String)

Parameters

Parameter Required Description

DomainSiteService

Yes

The [Domain]Site.Service to which to connect.  A domain is optional. The service must be a valid CVS.

Remarks

Returns 0 if successful and a non-zero value if the connection failed.

Example

The following example connects the CvsClient object to the CYGDEMO.UIS on domain 5410:

Example

Sub TheView_EventInitialize()

'Connect to a UIS

Dim This : Set This = TheView

CvsClient.Connect("[5410]CYGDEMO.UIS")

End Sub

Back to top

Disconnect

The Disconnect method disconnects from the service.

Syntax

Disconnect() As Integer

Remarks

Returns 0 if successful and a non-zero value if the disconnect failed.

Example

Sub btnButton_EventClick()

Dim This : Set This = btnButton

Dim iTest

iTest = CvsClient.Disconnect()

If iTest <> 0 Then

MsgBox "Error in disconnecting"

End If

End Sub

Back to top

GetConsoleData

The GetConsoleData method returns the console text and display attributes as two 25x80 arrays of unsigned characters.

Syntax

GetConsoleData(ByRef pText, ByRef pAttr) As Integer

Parameters

Parameter Required Description

pText

Yes

A two-dimensional 25x80 array of console text attributes returned by this method.

pAttr

Yes

A two-dimensional 25x80 array of console display attributes returned by this method.

Remarks

This method returns 0 if successful.

Example

The following example writes the console text and display attributes to a CSV file.

Sub

Dim aryText, aryAttr, nRet

nRet = CvsClient.GetConsoleData(aryText, aryAttr)

 

' Write text attributes to CSV file

Dim i, j, strMsg

For i = 0 To UBound(aryText, 1)

For j = 0 To UBound(aryText, 2)

strMsg = strMsg + CStr(aryText(i, j)) + ","

Next

strMsg = strMsg + vbCr

Next

 

dim fso, file

Set fso = CreateObject("Scripting.FileSystemObject")

Set file = fso.OpenTextFile("c:\console_text_attrs.csv", 2, True)

file.WriteLine(strMsg)

file.Close

 

strMsg = ""

 

' Write display attributes to CSV file

For i = 0 To UBound(aryAttr, 1)

For j = 0 To UBound(aryAttr, 2)

strMsg = strMsg + CStr(aryAttr(i, j)) + ","

Next

strMsg = strMsg + vbCr

Next

 

Set file = fso.OpenTextFile("c:\console_disp_attrs.csv", 2, True)

file.WriteLine(strMsg)

file.Close

 

MsgBox nRet

End Sub

Back to top

GetFacilityList

The GetFacilityList method returns a list of facility IDs in a CVS.

Syntax

GetFacilityList(ByRef FacilityList) As Integer

Parameters

Parameter Required Description

FacilityList

Yes

Output. The array of facilities received.

Back to top

GetNamedRec

Syntax

GetNamedRec(Request As GetNamedRecReq, Response As GetNamedRecResp) As Integer

Parameters

Parameter Required Description

Request

Yes

The request object that contains the parameters for this method.

Type: GetNamedRecReq

Response

Yes

The response object that contains the output of this method.

Type: GetNamedRecResp

Back to top

GetNamedRtREx

Syntax

GetNamedRtREx(Request As GetNamedRtRExReq, Response As GetNamedRtRExResp) As Integer

Parameters

Parameter Required Description

Request

Yes

The request object that contains the parameters for this method.

Type: GetNamedRtRExReq

Response

Yes

The response object that contains the output of this method.

Type: GetNamedRtRExResp

Back to top

GetNamedSRtREx

Syntax

GetNamedSRtREx(Request As GetNamedSRtRExReq, Response As GetNamedSRtRExResp) As Integer

Parameters

Parameter Required Description

Request

Yes

The request object that contains the parameters for this method.

Type: GetNamedSRtRExReq

Response

Yes

The response object that contains the output of this method.

Type: GetNamedSRtRExResp

Back to top

GetPointList

The GetPointList method returns a list of Short Point IDs.

Syntax

GetPointList(Descriptor As String, ByRef PointList) As Integer

Parameters

Parameter Required Description

Descriptor

Yes

Indicates the descriptor(s) to retrieve for the point.

PointList

Yes

Output. The array of Short Point IDs returned.

Back to top

GetRec

Syntax

GetRec(Request As GetRecReq, Response As GetRecResp) As Integer

Parameters

Parameter Required Description

Request

Yes

The request object that contains the parameters for this method.

Type: GetRecReq

Response

Yes

The response object that contains the output of this method.

Type: GetRecResp

Back to top

GetReferences

The GetReferences method refreshes the list of services referenced by the connected service.

Syntax

GetReferences () As Integer

Example

The following example refreshes the referenced services.

Sub GetReferences()

'Create and initialize the CVS Client

Dim CvsClient

Set CvsClient = CreateObject("CxCvs.CvsClient")

CvsClient.Connect("CYGDEMO.UIS")

 

uisClient.GetReferences()

End Sub

Back to top

GetRefs

Syntax

GetRefs(Request As GetRefsReq, Response As GetRefsResp) As Integer

Parameters

Parameter Required Description

Request

Yes

The request object that contains the parameters for this method.

Type: GetRefsReq

Response

Yes

The response object that contains the output of this method.

Type: GetRefsResp

Back to top

GetRtREx

Syntax

GetRtREx(Request As GetRtRExReq, Response As GetRtRExResp) As Integer

Parameters

Parameter Required Description

Request

Yes

The request object that contains the parameters for this method.

Type: GetRtRExReq

Response

Yes

The response object that contains the output of this method.

Type: GetRtRExResp

Back to top

GetShortNamedRec

Syntax

GetShortNamedRec(Request As GetShortNamedRecReq, Response As GetShortNamedRecResp) As Integer

Parameters

Parameter Required Description

Request

Yes

The request object that contains the parameters for this method.

Type: GetShortNamedRecReq

Response

Yes

The response object that contains the output of this method.

Type: GetShortNamedRecResp

Back to top

GetShortRec

Syntax

GetShortRec(Request As GetShortRecReq, Response As GetShortRecResp) As Integer

Parameters

Parameter Required Description

Request

Yes

The request object that contains the parameters for this method.

Type: GetShortRecReq

Response

Yes

The response object that contains the output of this method.

Type: GetShortRecResp

Back to top

GetSNamedRtREx

Syntax

GetSNamedRtREx(Request As GetSNamedRtRExReq, Response As GetSNamedRtRExResp) As Integer

Parameters

Parameter Required Description

Request

Yes

The request object that contains the parameters for this method.

Type: GetSNamedRtRExReq

Response

Yes

The response object that contains the output of this method.

Type: GetSNamedRtRExResp

Back to top

GetSRtREx

Syntax

GetSRtREx(Request As GetSRtRExReq, Response As GetSRtRExResp) As Integer

Parameters

Parameter Required Description

Request

Yes

The request object that contains the parameters for this method.

Type: GetSRtRExReq

Response

Yes

The response object that contains the output of this method.

Type: GetSRtRExResp

Back to top

MatchName

Syntax

MatchName(Request As MatchNameReq, Response As MatchNameResp) As Integer

Parameters

Parameter Required Description

Request

Yes

The request object that contains the parameters for this method.

Type: MatchNameReq

Response

Yes

The response object that contains the output of this method.

Type: MatchNameResp

Back to top

MatchNamedRtREx

Syntax

MatchNamedRtREx(Request As MatchNamedRtRExReq, Response As MatchNamedRtRExResp) As Integer

Parameters

Parameter Required Description

Request

Yes

The request object that contains the parameters for this method.

Type: MatchNamedRtRExReq

Response

Yes

The response object that contains the output of this method.

Type: MatchNamedRtRExResp

Back to top

ResolvePoints

The ResolvePoints method resolves a list of facility UDCs or Long Point IDs.

Syntax

ResolvePoints(TagList, ByRef PointList) As Integer

Parameters

Parameter Required Description

TagList

Yes

An array of Long Point IDs or facility UDCs (in "FACILITY.UDC" format) to convert to Short Point IDs

PointList

Yes

Output. The array of Short Point IDs returned.

Back to top

SetRecord

Syntax

SetRecord(Request As SetRecordReq, Response As SetRecordResp) As Integer

Parameters

Parameter Required Description

Request

Yes

The request object that contains the parameters for this method.

Type: SetRecordReq

Response

Yes

The response object that contains the output of this method.

Type: SetRecordResp

Back to top

SetRtREx

Syntax

SetRtREx(Request As SetRtRExReq, Response As SetRtRExResp) As Integer

Parameters

Parameter Required Description

Request

Yes

The request object that contains the parameters for this method.

Type: SetRtRExReq

Response

Yes

The response object that contains the output of this method.

Type: SetRtRExResp

Back to top

Let us know how we can improve this topic.

CygNet at weatherford.com

© 2020 Weatherford. All rights reserved.